﻿public class Time {
    public int hour { get; set; }
    public int minute { get; set; }
    public int second { get; set; }
    public Time(int hour, int minute, int second) {
        this.hour = hour;
        this.minute = minute;
        this.second = second;
    }
    public bool EaqualTo(Time other) => hour == other.hour && minute == other.minute && second == other.second;
    public static bool IsLegal(Time t)
        => t.hour >= 0 && t.hour < 24 && t.minute >= 0 && t.minute < 60 && t.second >= 0 && t.second < 60;
    public override string ToString() => $"{hour:d2}:{minute:d2}:{second:d2}";

}